import time

from Unit_2.Base.Base import Base
from selenium.webdriver.common.by import By
class Page(Base):
    # 定位登录
    set_01=(By.CLASS_NAME,'headerLogin')
    # 输入账号
    set_02 = (By.ID,'userName')
    # 输入密码
    set_03 = (By.ID,'password')
    # 定位登录按钮
    set_04 = (By.NAME,'bi_Usuallogin')
    # 定位确定
    set_05 = (By.ID,'bindSub')
    # 定位dy
    set_06 = (By.CLASS_NAME,'search-btn')
    def search_01(self):
        self.click(self.set_01)
    def serach_02(self):
        self.send_keys(self.set_02,'15232008902')
    def serach_03(self):
        self.send_keys(self.set_03,'123456Aa')
    def search_04(self):
        self.click(self.set_04)
    def search_05(self):
        self.click(self.set_05)
    def business(self):
        self.open_url('https://www.jiuxian.com/')
        self.search_01()
        # self.windowSwitching()
        self.serach_02()
        self.serach_03()
        time.sleep(10)
        self.search_04()
        self.search_05()
